import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/fonts/iconfont.css'
import { Tabbar, TabbarItem, Icon, Grid, GridItem, Swipe, SwipeItem, List, NavBar, Card, Stepper, SwipeCell, Button, Checkbox, SubmitBar, GoodsAction, GoodsActionIcon, GoodsActionButton, Popup, Form, Field, ContactCard, AddressList, AddressEdit, Image, Search, Lazyload } from 'vant'
import loading from './assets/imgs/loading.jpg'
import { $alert } from './plugins'
import Loading from './plugins/loading'

Vue.use(Loading)
Vue.use($alert, {
  a: 10,
  b: 20
})
console.log(loading)
Vue.use(Tabbar)
  .use(TabbarItem)
  .use(Icon)
  .use(Grid)
  .use(GridItem)
  .use(Swipe)
  .use(SwipeItem)
  .use(List)
  .use(NavBar)
  .use(Card)
  .use(Stepper)
  .use(SwipeCell)
  .use(Button)
  .use(Checkbox)
  .use(SubmitBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Form)
  .use(Field)
  .use(ContactCard)
  .use(AddressList)
  .use(AddressEdit)
  .use(Image)
  .use(Search)
  .use(Lazyload, {
    loading: loading,
    error: loading,
    preload: 1
  })

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
